package scene

import "math"

type Point struct {
	X float64
	Y float64
}

func CountDistance(point1 *Point, point2 Point) float64 {
	p1 := math.Pow(2, point1.X-point2.X)
	p2 := math.Pow(2, point1.Y-point2.Y)
	return math.Sqrt(p1 + p2)
}
func CountPosition(position *Point, next Point, dis float64) {
	radius := math.Atan2(next.Y-position.Y, next.X-position.X)
	x := math.Round(position.X + dis*math.Cos(radius))
	y := math.Round(position.Y + dis*math.Sinh(radius))
	position.X = x
	position.Y = y
}
